{extend name="admin@public/base" /}
{block name="main-content"}
<link rel="stylesheet" type="text/css" href="__PUBLIC__/jQuery-Validation-Engine-2.6.2-ciaoca/css/validationEngine.jquery.css">
<script type="text/javascript" src="__PUBLIC__/jQuery-Validation-Engine-2.6.2-ciaoca/js/jquery.validationEngine-zh_CN.js"></script>
<script type="text/javascript" src="__PUBLIC__/jQuery-Validation-Engine-2.6.2-ciaoca/js/jquery.validationEngine.min.js"></script>
<div class="page-content">
    <!--主题-->
    <div class="page-header">
        <h1>
            您当前操作
            <small>
                <i class="ace-icon fa fa-angle-double-right"></i>
                添加组织结构
            </small>
        </h1>
    </div>
    <div class="row">
        <div class="col-xs-12">
            <form class="form-horizontal ajaxForm" name="form0" method="post" action="{:url('admin/organize/deptAddSubmit')}">
                <div class="form-group">
                    <label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 上级部门选择：  </label>
                    <div class="col-sm-9">
                        <select name="pid" id="pid" class="col-xs-10 col-sm-5 validate[required]">
                            <option value="">请选择</option>
                            {foreach $menu as $key =>$v}
                            <option value="{$v.id}" >{$v.lefthtml}{$v.name}</option>
                            {/foreach}
                        </select><span class="lbl">&nbsp;&nbsp;默认最高级别</span>
                    </div>
                </div>
                <div class="space-4"></div>
                <div class="form-group">
                    <label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 部门名称：  </label>
                    <div class="col-sm-9">
                        <input name="name" id="name" class="col-xs-2 col-sm-5 validate[required]" type="text" autocomplete="off">
                        <span class="lbl">&nbsp;&nbsp;<span class="red">*</span>必填</span>
                    </div>
                </div>
                <div class="space-4"></div>

                <div class="form-group">
                    <label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 状态： </label>
                    <div class="col-sm-9" style="margin-top: 7px">
                        <label>
                            <input name="isvalid" type="radio" value="1" class="ace"  checked/>
                            <span class="lbl"> 有效 </span>
                        </label>&nbsp;&nbsp;
                        <label>
                            <input name="isvalid"  type="radio" value="0" class="ace" />
                            <span class="lbl"> 禁用 </span>
                        </label>
                    </div>
                </div>
                <div class="space-4"></div>

                <div class="clearfix form-actions">
                    <div class="col-md-offset-3 col-md-9">
                        <input name="org_id" id="org_id" type="hidden" value="{$org_id}" />
                        <button class="btn btn-info" type="submit" id="submit_button">
                            <i class="ace-icon fa fa-check bigger-110"></i>
                            保存
                        </button>
                        &nbsp; &nbsp; &nbsp;
                        <button class="btn" type="reset">
                            <i class="ace-icon fa fa-undo bigger-110"></i>
                            重置
                        </button>
                    </div>
                </div>
        </div>
        </form>
    </div>

</div>
{/block}
{block name="scripts"}
<script type="text/javascript">
    $('.form-horizontal').validationEngine('attach',{
        promptPosition: 'bottomLeft',
        addPromptClass: 'formError-white',
        showOneMessage: true
    }); 
</script>
{/block}


